import MessageHandler from "@runtime/module/Handler/MessageHandler";
import { ClientMessage } from "@runtime/generate/message/ClientMessage";
import LabelComponent from "@runtime/UnityEngineBridge/LabelComponent";

/**
 * 标签刷新消息
 */
export default class LabelUpdateMessageHandler extends MessageHandler<ClientMessage.LabelUpdateMessage> {
    protected async RunAsync(message: ClientMessage.LabelUpdateMessage): Promise<void> {
        console.log('标签刷新消息',message);
        for (const information of message.Informations) {
            console.log('?????????????????????????');
            LabelComponent.Default.Update(information);
        }
    }
}
